package com.woniuxy.sale.controller;

import com.woniuxy.commons.annotations.RequirePermission;
import com.woniuxy.commons.result.Result;
import com.woniuxy.sale.service.ChooseProduceMsgService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.models.auth.In;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * @author: CHL  <br/>
 * @ToDo: <br>
 * Date: 2022/4/19:16:48  <br/>
 * Description:
 */
@RestController
@RequestMapping("/sale/chooseProduce")
@Api(tags = "选货单选择的商品信息")
public class ChooseProduceMsgController {
    @Resource
    ChooseProduceMsgService chooseProduceMsgService;

    @RequirePermission("system")
    @ApiOperation(value = "根据选货单id返回所有的选货信息")
    @GetMapping("/findChooseProduceBySoId/{currentPage}/{limit}/{soId}")
    public Result findChooseProduceBySoId(@PathVariable(value = "soId") Integer soId,
                                          @PathVariable(value = "currentPage" ) Integer currentPage,
                                          @PathVariable(value = "limit")Integer limit){
        return chooseProduceMsgService.findChooseProduceBySoId(currentPage,limit,soId);
    }

    @RequirePermission("addPackingList")
    @ApiOperation(value = "数据字典测试")
    @GetMapping("/dictTest/")
    public Result dictTest(){
        return chooseProduceMsgService.dictTest();
    }



}
